<!DOCTYPE html>
<html  lang="zh">
<head>
    <meta charset="utf-8" />

<meta name="generator" content="Hexo 3.9.0" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

<title>Ayang818&#39;s blog</title>


    <meta name="description" content="杨丰畅的博客">
<meta name="keywords" content="Do something new!">
<meta property="og:type" content="website">
<meta property="og:title" content="Ayang818&#39;s blog">
<meta property="og:url" content="https://ayang818.gitee.io/blog/page/2/index.html">
<meta property="og:site_name" content="Ayang818&#39;s blog">
<meta property="og:description" content="杨丰畅的博客">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://ayang818.gitee.io/blog/images/og_image.png">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Ayang818&#39;s blog">
<meta name="twitter:description" content="杨丰畅的博客">
<meta name="twitter:image" content="https://ayang818.gitee.io/blog/images/og_image.png">







<link rel="icon" href="https://upload-serve.oss-cn-beijing.aliyuncs.com/avatar/avatar.jpg">


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.7.2/css/bulma.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,600|Source+Code+Pro">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/styles/androidstudio.css">


    
    
<style>body>.footer,body>.navbar,body>.section{opacity:0}</style>

    
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/css/lightgallery.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.min.css">

    
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.css">

    
    
    
    
<link rel="stylesheet" href="/blog/css/back-to-top.css">

    
    
    
    
    
    
    
    <link rel="stylesheet" href="/blog/css/progressbar.css">
<script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>
    
    
    


<link rel="stylesheet" href="/blog/css/style.css">
</head>
<body class="is-3-column">
    <nav class="navbar navbar-main">
    <div class="container">
        <div class="navbar-brand is-flex-center">
            <a class="navbar-item navbar-logo" href="/blog/">
            
                <img src="https://upload-serve.oss-cn-beijing.aliyuncs.com/avatar/avatar.jpg" alt="Ayang818&#39;s blog" height="28">
            
            </a>
        </div>
        <div class="navbar-menu">
            
            <div class="navbar-start">
                
                <a class="navbar-item"
                href="/blog/">主页</a>
                
                <a class="navbar-item"
                href="/blog/archives">归档</a>
                
                <a class="navbar-item"
                href="/blog/tags">分类</a>
                
                <a class="navbar-item"
                href="/blog/about">关于</a>
                
                <a class="navbar-item"
                href="https://github.com/ayang818">Github</a>
                
            </div>
            
            <div class="navbar-end">
                
                    
                    <a class="navbar-item" target="_blank" rel="noopener" title="Github" href="https://github.com/ayang818">
                        
                        <i class="fab fa-github"></i>
                        
                    </a>
                    
                
                
                
                <a class="navbar-item search" title="搜索" href="javascript:;">
                    <i class="fas fa-search"></i>
                </a>
                
            </div>
        </div>
    </div>
</nav>
    
    <section class="section">
        <div class="container">
            <div class="columns">
                <div class="column is-8-tablet is-8-desktop is-6-widescreen has-order-2 column-main">
    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-11-14T10:05:25.000Z">2019-11-14</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    3 minutes 读完 (大约 491 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/使用CGlib实现动态代理模式/">使用CGlib实现动态代理模式</a>
            
        </h1>
        <div class="content">
            <h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>关于代理模式和使用JDK dynamic proxy实现的动态代理模式，已经在<a href="https://ayang818.gitee.io/blog/">使用JDK dynamic proxy实现动态代理模式</a>写过了，也说了Spring5之前使用的代理就是JDK默认的动态代理。然后我自己最近也在写一个框架——<a href="https://github.com/ayang818/Agito">Agito</a>。在自己实现AOP特性的时候，感觉使用JDK自带的动态代理并不容易实现我的需求，所以在技术选型的时候，我选择了CGlib这个字节码增强利器来实现动态代理。</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/设计模式/">设计模式</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/使用CGlib实现动态代理模式/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-11-12T12:57:34.000Z">2019-11-12</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    5 minutes 读完 (大约 793 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/使用JDK-dynamic-proxy实现动态代理/">使用JDK dynamic proxy实现动态代理模式</a>
            
        </h1>
        <div class="content">
            <h2 id="代理模式"><a href="#代理模式" class="headerlink" title="代理模式"></a>代理模式</h2><p>代理模式理解起来很简单，比如说我有一个接口叫做Hello</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">interface</span> <span class="title">Hello</span> </span>&#123;</span><br><span class="line">    <span class="function"><span class="keyword">void</span> <span class="title">say</span><span class="params">()</span></span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>他的实现类是HelloImpl</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">HelloImpl</span> <span class="keyword">implements</span> <span class="title">Hello</span> </span>&#123;</span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">say</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        System.out.println(<span class="string">"hello world"</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>但是我又想在say()调用前做些什么，这里其实很关键，因为你找到了一个<strong>切点</strong>，这就是AOP——面向方面编程的特征，这个待会再说。想加新的功能，但是我们都学过开闭原则，所以我们打算再创建一个代理类来实现这一功能(组合)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">HelloProxy</span> <span class="keyword">implements</span> <span class="title">Hello</span> </span>&#123;</span><br><span class="line">    <span class="keyword">private</span> Hello hello;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="title">HelloProxy</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        hello = <span class="keyword">new</span> HelloImpl();</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">say</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        System.out.println(<span class="string">"start"</span>);</span><br><span class="line">        hello.say();</span><br><span class="line">        System.out.println(<span class="string">"end"</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>然后运行试下</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">main</span><span class="params">(String[] args)</span> </span>&#123;</span><br><span class="line">    Hello hello = <span class="keyword">new</span> HelloProxy();</span><br><span class="line">    hello.say();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>结果就是</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">start</span><br><span class="line">hello world</span><br><span class="line">end</span><br></pre></td></tr></table></figure>

<p>这样看着既简单，又实现了需要的功能，似乎已经满足我们的需求了。这种方式叫做静态代理。</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/设计模式/">设计模式</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/使用JDK-dynamic-proxy实现动态代理/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-21T12:31:48.000Z">2019-10-21</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    8 minutes 读完 (大约 1157 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/servlet究竟是什么-servlet及子类源码分析/">servlet究竟是什么,servlet及子类源码分析</a>
            
        </h1>
        <div class="content">
            <h2 id="servlet是什么"><a href="#servlet是什么" class="headerlink" title="servlet是什么"></a>servlet是什么</h2><p>好像在使用了SpringBoot后，或者说Spring后，程序员好像越来越难接触到servlet这个东西了，很多人以为隐藏在重重框架后的servlet是个超级复杂的洪水猛兽，但是并不是这样的。<strong>事实上，servlet就是一个Java接口</strong>，interface! 打开idea，ctrl + shift + n，搜索servlet，就可以看到是一个只有5个方法的interface!</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">interface</span> <span class="title">Servlet</span> </span>&#123;</span><br><span class="line">    <span class="function"><span class="keyword">void</span> <span class="title">init</span><span class="params">(ServletConfig var1)</span> <span class="keyword">throws</span> ServletException</span>;</span><br><span class="line"></span><br><span class="line">    <span class="function">ServletConfig <span class="title">getServletConfig</span><span class="params">()</span></span>;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">void</span> <span class="title">service</span><span class="params">(ServletRequest var1, ServletResponse var2)</span> <span class="keyword">throws</span> ServletException, IOException</span>;</span><br><span class="line"></span><br><span class="line">    <span class="function">String <span class="title">getServletInfo</span><span class="params">()</span></span>;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">void</span> <span class="title">destroy</span><span class="params">()</span></span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>所谓接口，无非是为了规范。那么对于那些实现了servlet接口的类来说呢？他们就可以处理网络请求的吗？当然是不可以的！servlet并不与客户端直接打交道，真正和客户端打交道的东西是tomcat容器，tomcat监听了端口，每过来一个http请求，tomcat根据http请求的url，将请求转发到tomcat中的对应的servlet容器中，然后servlet处理业务逻辑后返回一个response对象，tomcat再将这个response返回给客户端。</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/JavaWeb/">JavaWeb</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/源码/">源码</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/servlet究竟是什么-servlet及子类源码分析/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-14T07:54:35.000Z">2019-10-14</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    6 minutes 读完 (大约 857 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/巧妙使用位运算/">巧妙使用位运算</a>
            
        </h1>
        <div class="content">
            <h2 id="巧妙使用位运算-amp-amp-Leetcode-421-Maximum-XOR-of-Two-Numbers-in-an-Array"><a href="#巧妙使用位运算-amp-amp-Leetcode-421-Maximum-XOR-of-Two-Numbers-in-an-Array" class="headerlink" title="巧妙使用位运算 &amp;&amp; Leetcode 421 Maximum XOR of Two Numbers in an Array"></a>巧妙使用位运算 &amp;&amp; Leetcode 421 Maximum XOR of Two Numbers in an Array</h2><blockquote>
<p>部分参考 ： <a href="https://www.hollischuang.com/archives/2091">全网把Map中的hash()分析的最透彻的文章，别无二家。</a></p>
</blockquote>
<p>在学习ConcurrentHashMap的分段锁机制时，对于根据hashcode的一些操作结果，分配锁数组中的锁对象的机制不是很理解。于是看了看开头提到的文章，确实理解了很多。中间看着有些磕磕绊绊，主要是不是很明白其中一些位运算道理在做什么。举个栗子</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Java/">Java</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/巧妙使用位运算/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-11T09:47:10.000Z">2019-10-11</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    7 minutes 读完 (大约 988 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/学习阶段总结/">学习阶段总结</a>
            
        </h1>
        <div class="content">
            <h2 id="学习阶段总结"><a href="#学习阶段总结" class="headerlink" title="学习阶段总结"></a>学习阶段总结</h2><p>学了这么久，感觉其实对Java的学习已经进入了一个快乐的快车期了，许多东西都已经串联到了一起。这里我想列举一下我学习Java的一些资料。</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Kotlin/">Kotlin</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/阶段总结/">阶段总结</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/学习阶段总结/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-10T12:47:18.000Z">2019-10-10</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    6 minutes 读完 (大约 901 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/Java中的锁优化-1/">Java中的锁优化(1)</a>
            
        </h1>
        <div class="content">
            <blockquote>
<p> 部分内容参考《深入理解Java虚拟机》第五部分——高效并发</p>
</blockquote>
<h2 id="锁优化"><a href="#锁优化" class="headerlink" title="锁优化"></a>锁优化</h2><p>高效并发是JDK1.5-JDK1.6的一个重要改进，HotSpot虚拟机团队在开发这个版本的时候花了大量的精力去实现各种锁优化技术，比如适应性自旋，锁消除，锁粗化，轻量级锁和偏向锁等，这些技术都是为了在线程之间更加高效的共享数据，以及解决竞争问题。这篇文章将以概念介绍为主。</p>
<h3 id="自旋锁与自适应自旋"><a href="#自旋锁与自适应自旋" class="headerlink" title="自旋锁与自适应自旋"></a>自旋锁与自适应自旋</h3><p>我们知道往往在讨论锁的互斥同步的时候，其对性能最大的损耗就是阻塞的实现，挂起线程和回复线程都要进入操作系统内核态完成。然而其实有些阻塞只是很短的时间，没有必要挂起线程，所以这个时候可以选择让线程进入一个忙循环，知道阻塞条件结束，这就是所谓的自旋锁，关于自旋的代码可以参照我的这篇文章——<a href="https://ayang818.gitee.io/blog/2019/07/16/Java原子性操作以及简单的锁的实现-1/">Java原子性操作以及不如来手写一个简单锁</a>，由于自旋是不断重试的过程，要是一直重试失败，就会造成CPU资源浪费，所以自旋需要设置次数；而所谓自适应自旋就是指根据前一次在同一个锁上的自旋时间，以及锁的拥有者的状态来判断自旋次数或是否自旋，这些在JDK1.6中都已经帮我们实现了。</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Java/">Java</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/并发编程/">并发编程</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/Java中的锁优化-1/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-07T12:17:24.000Z">2019-10-07</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    9 minutes 读完 (大约 1364 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/Leetcode的几道有意思的多线程题/">Leetcode的几道有意思的多线程题</a>
            
        </h1>
        <div class="content">
            <h2 id="前记"><a href="#前记" class="headerlink" title="前记"></a>前记</h2><p>最近一直在看Java的多线程编程,但苦于这东西有点过于偏向理论,结果今天上了Leetcode上看了下,发现居然有多线程相关的题目，(虽然只有五题),顺便放个链接吧，<a href="https://leetcode-cn.com/problemset/concurrency/">题目链接</a>。题目感觉就是让你使用一些同步工具类或者锁或其他机制来完成要求，挺有意思的.</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Java/">Java</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/并发编程/">并发编程</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/Leetcode的几道有意思的多线程题/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-04T12:17:24.000Z">2019-10-04</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    6 minutes 读完 (大约 876 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/Java中的对象锁/">Java中的对象锁(Monitor)</a>
            
        </h1>
        <div class="content">
            <h2 id="Java中的对象锁"><a href="#Java中的对象锁" class="headerlink" title="Java中的对象锁"></a>Java中的对象锁</h2><p>说到对象锁，要与之对比就不得不讲到类锁。在写单例模式的时候其实经常会用在双重校验锁中用到类锁，如下面的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> ClassLock &#123;</span><br><span class="line">    priavte volatiled ClassLock classLock;</span><br><span class="line">    </span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="title">ClassLock</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="comment">// init</span></span><br><span class="line">    &#125; </span><br><span class="line">    </span><br><span class="line">    <span class="function"><span class="keyword">public</span> ClassLock <span class="title">getInstance</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">if</span> (classLock ==  <span class="keyword">null</span>) &#123;</span><br><span class="line">            <span class="keyword">synchronized</span> (ClassLock.class) &#123;</span><br><span class="line">                <span class="keyword">if</span> (classLock == <span class="keyword">null</span>) &#123;</span><br><span class="line">                    classLock = <span class="keyword">new</span> ClassLock();</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">return</span> classLock;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>可以看到在上面的代码中我们是对一整个类进行加锁，包括直接在方法签名上使用synchronized关键字，这都是属于类锁的范畴。因为在调用一个类的实例的时候，当运行其中一个加锁的方法时，其他加锁的方法是不可以执行的。也就是说一个类其实只有一个类锁，它锁住的对象是一个类。但是对象锁不一样，一个类中可以有多个对象，也就是说对象锁在一个类的实例中不止一个, 而每个对象都可以成为一个Monitor。对象锁往往用于多个线程之间的协作，与之配套的工具是synchronized，wait，notify，notifyAll。</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Java/">Java</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/并发编程/">并发编程</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/Java中的对象锁/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-03T12:17:24.000Z">2019-10-03</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    a minute 读完 (大约 192 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/万能的Java方法论/">IDEA远程调试</a>
            
        </h1>
        <div class="content">
            <blockquote>
<p>java世界里的一切东西都是在拼Java命令行参数</p>
</blockquote>
<h2 id="Debug之前"><a href="#Debug之前" class="headerlink" title="Debug之前"></a>Debug之前</h2><p>调试一切Java程序，想清楚两点</p>
<ul>
<li>想清楚要调试的代码跑在哪个JVM中</li>
<li>找到要调试的源代码</li>
</ul>
<p>随时随地Debug</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">java -agentlib:jdwp=transport=dt_socket,server=y,<span class="built_in">suspend</span>=y,address=1044 FileName</span><br></pre></td></tr></table></figure>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Java/">Java</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/万能的Java方法论/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>








    
<div class="card">
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-10-02T12:17:24.000Z">2019-10-02</time>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    13 minutes 读完 (大约 1945 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                <a class="has-link-black-ter" href="/blog/彻底搞懂 Git-Rebase/">彻底搞懂 Git-Rebase</a>
            
        </h1>
        <div class="content">
            <h1 id="彻底搞懂-Git-Rebase"><a href="#彻底搞懂-Git-Rebase" class="headerlink" title="彻底搞懂 Git-Rebase"></a>彻底搞懂 Git-Rebase</h1><p>使用 Git 已经好几年了，却始终只是熟悉一些常用的操作。对于 Git Rebase 却很少用到，直到这一次，不得不用。</p>
<h4 id="一、起因"><a href="#一、起因" class="headerlink" title="一、起因"></a>一、起因</h4><p>上线构建的过程中扫了一眼代码变更，突然发现，<code>commit</code> 提交竟然多达 <code>62</code> 次。我们来看看都提交了什么东西：<br><img src="https://raw.githubusercontent.com/chenfengyanyu/my-web-accumulation/master/images/git-rebase/commit1.png" alt="commit1"></p>
<p>这里我们先不说 <code>git</code> <a href="http://jartto.wang/2018/07/08/git-commit/">提交规范</a>，就单纯这么多次无用的 <code>commit</code> 就很让人不舒服。可能很多人觉得无所谓，无非是多了一些提交纪录。</p>
<p>然而，并非如此，你可能听过破窗效应，编程也是如此！</p>
        </div>
        
        
        <div class="level is-mobile is-flex">
        <div class="level-start">
            
            <div class="level-item is-size-7 is-uppercase">
                <i class="fas fa-tags has-text-grey"></i>&nbsp;
                <a class="has-link-grey -link" href="/blog/tags/Git/">Git</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/日常技能/">日常技能</a>,&nbsp;<a class="has-link-grey -link" href="/blog/tags/转载/">转载</a>
            </div>
            
        </div>
        <div class="level-start">
            <div class="level-item">
            <a class="button is-size-7 is-light" href="/blog/彻底搞懂 Git-Rebase/#more">阅读更多</a>
            </div>
        </div>
        </div>
        
        
    </div>
</div>









    
<div class="card card-transparent">
    <nav class="pagination is-centered" role="navigation" aria-label="pagination">
        <div class="pagination-previous">
            <a class="is-flex-grow has-text-black-ter" href="/blog/">上一页</a>
        </div>
        <div class="pagination-next">
            <a class="is-flex-grow has-text-black-ter" href="/blog/page/3/">下一页</a>
        </div>
        <ul class="pagination-list is-hidden-mobile">
            
            <li><a class="pagination-link has-text-black-ter" href="/blog/">1</a></li>
            
            <li><a class="pagination-link is-current" href="/blog/page/2/">2</a></li>
            
            <li><a class="pagination-link has-text-black-ter" href="/blog/page/3/">3</a></li>
            
            <li><a class="pagination-link has-text-black-ter" href="/blog/page/4/">4</a></li>
            
            <li><a class="pagination-link has-text-black-ter" href="/blog/page/5/">5</a></li>
            
        </ul>
    </nav>
</div>
</div>
                




<div class="column is-4-tablet is-4-desktop is-3-widescreen  has-order-1 column-left ">
    
        
<div class="card widget">
    <div class="card-content">
        <nav class="level">
            <div class="level-item has-text-centered" style="flex-shrink: 1">
                <div>
                    
                    <figure class="image is-128x128 has-mb-6">
                        <img class="" src="https://upload-serve.oss-cn-beijing.aliyuncs.com/avatar/avatar.jpg" alt="Ayang818 (杨丰畅)">
                    </figure>
                    
                    <p class="is-size-4 is-block">
                        Ayang818 (杨丰畅)
                    </p>
                    
                    
                    
                    <p class="is-size-6 is-flex is-flex-center has-text-grey">
                        <i class="fas fa-map-marker-alt has-mr-7"></i>
                        <span>中国，杭州</span>
                    </p>
                    
                </div>
            </div>
        </nav>
        <nav class="level is-mobile">
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        文章
                    </p>
                    <a href="/blog/archives">
                        <p class="title has-text-weight-normal">
                            46
                        </p>
                    </a>
                </div>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        分类
                    </p>
                    <a href="/blog/categories">
                        <p class="title has-text-weight-normal">
                            0
                        </p>
                    </a>
                </div>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        标签
                    </p>
                    <a href="/blog/tags">
                        <p class="title has-text-weight-normal">
                            31
                        </p>
                    </a>
                </div>
            </div>
        </nav>
        
        <div class="level">
            <a class="level-item button is-link is-rounded" href="https://github.com/ayang818" target="_blank" rel="noopener">
                关注我</a>
        </div>
        
        
        
        <div class="level is-mobile">
            
            <a class="level-item button is-white is-marginless" target="_blank" rel="noopener"
                title="Github" href="https://github.com/ayang818">
                
                <i class="fab fa-github"></i>
                
            </a>
            
            <a class="level-item button is-white is-marginless" target="_blank" rel="noopener"
                title="RSS" href="/blog/">
                
                <i class="fas fa-rss"></i>
                
            </a>
            
        </div>
        
    </div>
</div>
    
        
    
        <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            链接
        </h3>
        <ul class="menu-list">
        
            <li>
                <a class="level is-mobile" href="https://blog.csdn.net/syh0313" target="_blank" rel="noopener">
                    <span class="level-left">
                        <span class="level-item">syh0313</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">blog.csdn.net</span>
                    </span>
                </a>
            </li>
        
            <li>
                <a class="level is-mobile" href="https://wzyxv1n.top/" target="_blank" rel="noopener">
                    <span class="level-left">
                        <span class="level-item">wenzhuan</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">wzyxv1n.top</span>
                    </span>
                </a>
            </li>
        
            <li>
                <a class="level is-mobile" href="https://blog.csdn.net/weixin_43434223" target="_blank" rel="noopener">
                    <span class="level-left">
                        <span class="level-item">旧博客</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">blog.csdn.net</span>
                    </span>
                </a>
            </li>
        
        </ul>
        </div>
    </div>
</div>

    
        <div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            标签云
        </h3>
        <a href="/blog/tags/DevOps/" style="font-size: 12.5px;">DevOps</a> <a href="/blog/tags/Git/" style="font-size: 10px;">Git</a> <a href="/blog/tags/IDEA/" style="font-size: 10px;">IDEA</a> <a href="/blog/tags/Java/" style="font-size: 20px;">Java</a> <a href="/blog/tags/JavaWeb/" style="font-size: 10px;">JavaWeb</a> <a href="/blog/tags/Kotlin/" style="font-size: 10px;">Kotlin</a> <a href="/blog/tags/Kugga/" style="font-size: 10px;">Kugga</a> <a href="/blog/tags/Vue/" style="font-size: 10px;">Vue</a> <a href="/blog/tags/express/" style="font-size: 10px;">express</a> <a href="/blog/tags/js/" style="font-size: 12.5px;">js</a> <a href="/blog/tags/maven/" style="font-size: 10px;">maven</a> <a href="/blog/tags/mybatis/" style="font-size: 10px;">mybatis</a> <a href="/blog/tags/mysql/" style="font-size: 10px;">mysql</a> <a href="/blog/tags/python/" style="font-size: 10px;">python</a> <a href="/blog/tags/分布式理论/" style="font-size: 12.5px;">分布式理论</a> <a href="/blog/tags/前后端分离/" style="font-size: 15px;">前后端分离</a> <a href="/blog/tags/反射/" style="font-size: 10px;">反射</a> <a href="/blog/tags/并发编程/" style="font-size: 17.5px;">并发编程</a> <a href="/blog/tags/微服务/" style="font-size: 10px;">微服务</a> <a href="/blog/tags/性能挑战赛/" style="font-size: 10px;">性能挑战赛</a> <a href="/blog/tags/日常技能/" style="font-size: 10px;">日常技能</a> <a href="/blog/tags/源码/" style="font-size: 10px;">源码</a> <a href="/blog/tags/算法/" style="font-size: 10px;">算法</a> <a href="/blog/tags/算法与数据结构/" style="font-size: 10px;">算法与数据结构</a> <a href="/blog/tags/老代码/" style="font-size: 10px;">老代码</a> <a href="/blog/tags/自嗨/" style="font-size: 10px;">自嗨</a> <a href="/blog/tags/设计模式/" style="font-size: 17.5px;">设计模式</a> <a href="/blog/tags/转载/" style="font-size: 10px;">转载</a> <a href="/blog/tags/部门教程/" style="font-size: 12.5px;">部门教程</a> <a href="/blog/tags/阶段总结/" style="font-size: 10px;">阶段总结</a> <a href="/blog/tags/随笔/" style="font-size: 15px;">随笔</a>
    </div>
</div>
    
    
        <div class="column-right-shadow is-hidden-widescreen ">
        
            <div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            最新文章
        </h3>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-05-02T05:10:49.000Z">2020-05-02</time></div>
                    <a href="/blog/第一届云原生编程挑战赛-分布式统计和过滤的链路追踪/" class="title has-link-black-ter is-size-6 has-text-weight-normal">第一届云原生编程挑战赛参赛小结</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-04-24T04:18:07.000Z">2020-04-24</time></div>
                    <a href="/blog/DevOps-使用Azure-pipeline为你的应用构建CI-CD流水线/" class="title has-link-black-ter is-size-6 has-text-weight-normal">[DevOps] 使用Azure pipeline + Github为你的应用构建CI/CD流水线</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-04-12T14:59:58.000Z">2020-04-12</time></div>
                    <a href="/blog/DevOps-如何写一个可快速构建镜像的Dockerfile脚本/" class="title has-link-black-ter is-size-6 has-text-weight-normal">[DevOps] 如何写一个可快速构建镜像的Dockerfile脚本</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-03-01T14:43:07.000Z">2020-03-01</time></div>
                    <a href="/blog/java-instrument/" class="title has-link-black-ter is-size-6 has-text-weight-normal">浅析Java强大的动态Instrumention能力</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-02-14T08:32:18.000Z">2020-02-14</time></div>
                    <a href="/blog/常用的一些算法板子-持续更新/" class="title has-link-black-ter is-size-6 has-text-weight-normal">常用的一些算法板子(持续更新)</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>
        
            <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            归档
        </h3>
        <ul class="menu-list">
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/05/">
                <span class="level-start">
                    <span class="level-item">May 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/04/">
                <span class="level-start">
                    <span class="level-item">April 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/03/">
                <span class="level-start">
                    <span class="level-item">March 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/02/">
                <span class="level-start">
                    <span class="level-item">February 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/01/">
                <span class="level-start">
                    <span class="level-item">January 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/12/">
                <span class="level-start">
                    <span class="level-item">December 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">3</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/11/">
                <span class="level-start">
                    <span class="level-item">November 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/10/">
                <span class="level-start">
                    <span class="level-item">October 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">8</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/09/">
                <span class="level-start">
                    <span class="level-item">September 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">9</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/08/">
                <span class="level-start">
                    <span class="level-item">August 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">7</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/07/">
                <span class="level-start">
                    <span class="level-item">July 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">7</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/06/">
                <span class="level-start">
                    <span class="level-item">June 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/03/">
                <span class="level-start">
                    <span class="level-item">March 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        </ul>
        </div>
    </div>
</div>
        
        </div>
    
</div>

                
                




<div class="column is-4-tablet is-4-desktop is-3-widescreen is-hidden-touch is-hidden-desktop-only has-order-3 column-right ">
    
        <div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            最新文章
        </h3>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-05-02T05:10:49.000Z">2020-05-02</time></div>
                    <a href="/blog/第一届云原生编程挑战赛-分布式统计和过滤的链路追踪/" class="title has-link-black-ter is-size-6 has-text-weight-normal">第一届云原生编程挑战赛参赛小结</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-04-24T04:18:07.000Z">2020-04-24</time></div>
                    <a href="/blog/DevOps-使用Azure-pipeline为你的应用构建CI-CD流水线/" class="title has-link-black-ter is-size-6 has-text-weight-normal">[DevOps] 使用Azure pipeline + Github为你的应用构建CI/CD流水线</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-04-12T14:59:58.000Z">2020-04-12</time></div>
                    <a href="/blog/DevOps-如何写一个可快速构建镜像的Dockerfile脚本/" class="title has-link-black-ter is-size-6 has-text-weight-normal">[DevOps] 如何写一个可快速构建镜像的Dockerfile脚本</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-03-01T14:43:07.000Z">2020-03-01</time></div>
                    <a href="/blog/java-instrument/" class="title has-link-black-ter is-size-6 has-text-weight-normal">浅析Java强大的动态Instrumention能力</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
        <article class="media">
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2020-02-14T08:32:18.000Z">2020-02-14</time></div>
                    <a href="/blog/常用的一些算法板子-持续更新/" class="title has-link-black-ter is-size-6 has-text-weight-normal">常用的一些算法板子(持续更新)</a>
                    <p class="is-size-7 is-uppercase">
                        
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>
    
        <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            归档
        </h3>
        <ul class="menu-list">
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/05/">
                <span class="level-start">
                    <span class="level-item">May 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/04/">
                <span class="level-start">
                    <span class="level-item">April 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/03/">
                <span class="level-start">
                    <span class="level-item">March 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/02/">
                <span class="level-start">
                    <span class="level-item">February 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2020/01/">
                <span class="level-start">
                    <span class="level-item">January 2020</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/12/">
                <span class="level-start">
                    <span class="level-item">December 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">3</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/11/">
                <span class="level-start">
                    <span class="level-item">November 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/10/">
                <span class="level-start">
                    <span class="level-item">October 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">8</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/09/">
                <span class="level-start">
                    <span class="level-item">September 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">9</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/08/">
                <span class="level-start">
                    <span class="level-item">August 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">7</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/07/">
                <span class="level-start">
                    <span class="level-item">July 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">7</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/06/">
                <span class="level-start">
                    <span class="level-item">June 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">2</span>
                </span>
            </a>
        </li>
        
        <li>
            <a class="level is-marginless" href="/blog/archives/2019/03/">
                <span class="level-start">
                    <span class="level-item">March 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        </ul>
        </div>
    </div>
</div>
    
    
</div>

                
            </div>
        </div>
    </section>
    <footer class="footer">
    <div class="container">
        <div class="level">
            <div class="level-start has-text-centered-mobile">
                <a class="footer-logo is-block has-mb-6" href="/blog/">
                
                    <img src="https://upload-serve.oss-cn-beijing.aliyuncs.com/avatar/avatar.jpg" alt="Ayang818&#39;s blog" height="28">
                
                </a>
                <p class="is-size-7">
                &copy; 2020 ayang818&nbsp;
                Powered by <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a> & <a
                        href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a>
                
                </p>
            </div>
            <div class="level-end">
            
                <div class="field has-addons is-flex-center-mobile has-mt-5-mobile is-flex-wrap is-flex-middle">
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" rel="noopener" title="Creative Commons" href="https://creativecommons.org/">
                        
                        <i class="fab fa-creative-commons"></i>
                        
                    </a>
                </p>
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" rel="noopener" title="Attribution 4.0 International" href="https://creativecommons.org/licenses/by/4.0/">
                        
                        <i class="fab fa-creative-commons-by"></i>
                        
                    </a>
                </p>
                
                </div>
            
            </div>
        </div>
    </div>
</footer>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2.22.2/min/moment-with-locales.min.js"></script>
<script>moment.locale("zh-Hans");</script>


<script>
var IcarusThemeSettings = {
    site: {
        url: 'https://ayang818.gitee.io/blog',
        external_link: {"enable":true,"exclude":[]}
    },
    article: {
        highlight: {
            clipboard: true,
            fold: 'unfolded'
        }
    }
};
</script>


<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.4/dist/clipboard.min.js" defer></script>





<script src="/blog/js/animation.js"></script>



<script src="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/js/lightgallery.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js" defer></script>
<script src="/blog/js/gallery.js" defer></script>



<div id="outdated">
    <h6>Your browser is out-of-date!</h6>
    <p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="http://outdatedbrowser.com/">Update
            my browser now </a></p>
    <p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">&times;</a></p>
</div>
<script src="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js" defer></script>
<script>
    document.addEventListener("DOMContentLoaded", function () {
        outdatedBrowser({
            bgColor: '#f25648',
            color: '#ffffff',
            lowerThan: 'flex'
        });
    });
</script>


<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.5/unpacked/MathJax.js?config=TeX-MML-AM_CHTML" defer></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
    MathJax.Hub.Config({
        'HTML-CSS': {
            matchFontHeight: false
        },
        SVG: {
            matchFontHeight: false
        },
        CommonHTML: {
            matchFontHeight: false
        },
        tex2jax: {
            inlineMath: [
                ['$','$'],
                ['\\(','\\)']
            ]
        }
    });
});
</script>


<a id="back-to-top" title="回到顶端" href="javascript:;">
    <i class="fas fa-chevron-up"></i>
</a>
<script src="/blog/js/back-to-top.js" defer></script>














<script src="/blog/js/main.js" defer></script>

    
    <div class="searchbox ins-search">
    <div class="searchbox-container ins-search-container">
        <div class="searchbox-input-wrapper">
            <input type="text" class="searchbox-input ins-search-input" placeholder="想要查找什么..." />
            <span class="searchbox-close ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="searchbox-result-wrapper ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: '文章',
                PAGES: '页面',
                CATEGORIES: '分类',
                TAGS: '标签',
                UNTITLED: '(无标题)',
            },
            CONTENT_URL: '/blog/content.json',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script src="/blog/js/insight.js" defer></script>
<link rel="stylesheet" href="/blog/css/search.css">
<link rel="stylesheet" href="/blog/css/insight.css">
    
<script src="/blog/node_modules/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"node_modules/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/blog/node_modules/assets/shizuku.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true},"react":{"opacity":0.7},"log":false});</script></body>
</html>